package com.michael.demo.springcloud.alibaba.seata.order.feign.failback;

import com.michael.demo.springcloud.alibaba.seata.order.feign.UserAccountService;

/**
 * 类功能描述:
 * <pre>
 *   降级处理类
 * </pre>
 *
 * @author Michael
 * @version 1.0
 * @date 2021/03/31 14:35
 */
public class UserAccountServiceFallback implements UserAccountService {

    private Throwable throwable;

    public UserAccountServiceFallback(Throwable throwable) {
        this.throwable = throwable;
    }

    @Override
    public String deduct(Long userId, Integer money) {
        throwable.printStackTrace();
        return "扣减降级";
    }
}
